3.3.91 \(\int \sqrt {-1-\tan ^2(x)} \, dx\) [291]

3.3.91.1 Optimal result
3.3.91.2 Mathematica [A] (verified)
3.3.91.3 Rubi [A] (verified)
3.3.91.4 Maple [A] (verified)
3.3.91.5 Fricas [C] (verification not implemented)
3.3.91.6 Sympy [F]
3.3.91.7 Maxima [A] (verification not implemented)
3.3.91.8 Giac [C] (verification not implemented)
3.3.91.9 Mupad [B] (verification not implemented)

3.3.91.1 Optimal result

Integrand size = 12, antiderivative size = 16 \[ \int \sqrt {-1-\tan ^2(x)} \, dx=-\arctan \left (\frac {\tan (x)}{\sqrt {-\sec ^2(x)}}\right ) \]

output
-arctan(tan(x)/(-sec(x)^2)^(1/2))
 
3.3.91.2 Mathematica [A] (verified)

Time = 0.01 (sec) , antiderivative size = 16, normalized size of antiderivative = 1.00 \[ \int \sqrt {-1-\tan ^2(x)} \, dx=\text {arctanh}(\sin (x)) \cos (x) \sqrt {-\sec ^2(x)} \]

input
Integrate[Sqrt[-1 - Tan[x]^2],x]
 
output
ArcTanh[Sin[x]]*Cos[x]*Sqrt[-Sec[x]^2]
 
3.3.91.3 Rubi [A] (verified)

Time = 0.23 (sec) , antiderivative size = 18, normalized size of antiderivative = 1.12, number of steps used = 7, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.500, Rules used = {3042, 4140, 3042, 4610, 224, 216}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \sqrt {-\tan ^2(x)-1} \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \sqrt {-\tan (x)^2-1}dx\)

\(\Big \downarrow \) 4140

\(\displaystyle \int \sqrt {-\sec ^2(x)}dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \sqrt {-\sec (x)^2}dx\)

\(\Big \downarrow \) 4610

\(\displaystyle -\int \frac {1}{\sqrt {-\tan ^2(x)-1}}d\tan (x)\)

\(\Big \downarrow \) 224

\(\displaystyle -\int \frac {1}{\frac {\tan ^2(x)}{-\tan ^2(x)-1}+1}d\frac {\tan (x)}{\sqrt {-\tan ^2(x)-1}}\)

\(\Big \downarrow \) 216

\(\displaystyle -\arctan \left (\frac {\tan (x)}{\sqrt {-\tan ^2(x)-1}}\right )\)

input
Int[Sqrt[-1 - Tan[x]^2],x]
 
output
-ArcTan[Tan[x]/Sqrt[-1 - Tan[x]^2]]
 

3.3.91.3.1 Defintions of rubi rules used

rule 216
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[b, 2]))*A 
rcTan[Rt[b, 2]*(x/Rt[a, 2])], x] /; FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a 
, 0] || GtQ[b, 0])
 

rule 224
Int[1/Sqrt[(a_) + (b_.)*(x_)^2], x_Symbol] :> Subst[Int[1/(1 - b*x^2), x], 
x, x/Sqrt[a + b*x^2]] /; FreeQ[{a, b}, x] &&  !GtQ[a, 0]
 

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 4140
Int[(u_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)]^2)^(p_), x_Symbol] :> Int[A 
ctivateTrig[u*(a*sec[e + f*x]^2)^p], x] /; FreeQ[{a, b, e, f, p}, x] && EqQ 
[a, b]
 

rule 4610
Int[((b_.)*sec[(e_.) + (f_.)*(x_)]^2)^(p_), x_Symbol] :> With[{ff = FreeFac 
tors[Tan[e + f*x], x]}, Simp[b*(ff/f)   Subst[Int[(b + b*ff^2*x^2)^(p - 1), 
 x], x, Tan[e + f*x]/ff], x]] /; FreeQ[{b, e, f, p}, x] &&  !IntegerQ[p]
 
3.3.91.4 Maple [A] (verified)

Time = 0.07 (sec) , antiderivative size = 17, normalized size of antiderivative = 1.06

method result size
derivativedivides \(-\arctan \left (\frac {\tan \left (x \right )}{\sqrt {-1-\tan \left (x \right )^{2}}}\right )\) \(17\)
default \(-\arctan \left (\frac {\tan \left (x \right )}{\sqrt {-1-\tan \left (x \right )^{2}}}\right )\) \(17\)
risch \(-2 \sqrt {-\frac {{\mathrm e}^{2 i x}}{\left ({\mathrm e}^{2 i x}+1\right )^{2}}}\, \ln \left ({\mathrm e}^{i x}-i\right ) \cos \left (x \right )+2 \sqrt {-\frac {{\mathrm e}^{2 i x}}{\left ({\mathrm e}^{2 i x}+1\right )^{2}}}\, \ln \left ({\mathrm e}^{i x}+i\right ) \cos \left (x \right )\) \(64\)

input
int((-1-tan(x)^2)^(1/2),x,method=_RETURNVERBOSE)
 
output
-arctan(tan(x)/(-1-tan(x)^2)^(1/2))
 
3.3.91.5 Fricas [C] (verification not implemented)

Result contains complex when optimal does not.

Time = 0.25 (sec) , antiderivative size = 19, normalized size of antiderivative = 1.19 \[ \int \sqrt {-1-\tan ^2(x)} \, dx=i \, \log \left (e^{\left (i \, x\right )} + i\right ) - i \, \log \left (e^{\left (i \, x\right )} - i\right ) \]

input
integrate((-1-tan(x)^2)^(1/2),x, algorithm="fricas")
 
output
I*log(e^(I*x) + I) - I*log(e^(I*x) - I)
 
3.3.91.6 Sympy [F]

\[ \int \sqrt {-1-\tan ^2(x)} \, dx=\int \sqrt {- \tan ^{2}{\left (x \right )} - 1}\, dx \]

input
integrate((-1-tan(x)**2)**(1/2),x)
 
output
Integral(sqrt(-tan(x)**2 - 1), x)
 
3.3.91.7 Maxima [A] (verification not implemented)

Time = 0.41 (sec) , antiderivative size = 17, normalized size of antiderivative = 1.06 \[ \int \sqrt {-1-\tan ^2(x)} \, dx=\arctan \left (\cos \left (x\right ), \sin \left (x\right ) + 1\right ) + \arctan \left (\cos \left (x\right ), -\sin \left (x\right ) + 1\right ) \]

input
integrate((-1-tan(x)^2)^(1/2),x, algorithm="maxima")
 
output
arctan2(cos(x), sin(x) + 1) + arctan2(cos(x), -sin(x) + 1)
 
3.3.91.8 Giac [C] (verification not implemented)

Result contains complex when optimal does not.

Time = 0.26 (sec) , antiderivative size = 16, normalized size of antiderivative = 1.00 \[ \int \sqrt {-1-\tan ^2(x)} \, dx=-i \, \log \left (\sqrt {\tan \left (x\right )^{2} + 1} - \tan \left (x\right )\right ) \]

input
integrate((-1-tan(x)^2)^(1/2),x, algorithm="giac")
 
output
-I*log(sqrt(tan(x)^2 + 1) - tan(x))
 
3.3.91.9 Mupad [B] (verification not implemented)

Time = 0.11 (sec) , antiderivative size = 16, normalized size of antiderivative = 1.00 \[ \int \sqrt {-1-\tan ^2(x)} \, dx=-\mathrm {atan}\left (\frac {\mathrm {tan}\left (x\right )}{\sqrt {-{\mathrm {tan}\left (x\right )}^2-1}}\right ) \]

input
int((- tan(x)^2 - 1)^(1/2),x)
 
output
-atan(tan(x)/(- tan(x)^2 - 1)^(1/2))